import VueRouter from 'vue-router'


// 导入对应的路由组件
import HomeContainer from "./components/tabbar/HomeContainer.vue"
import MemberContainer from "./components/tabbar/MemberContainer.vue"
import ShopcarContainer from "./components/tabbar/ShopcarContainer.vue"
import SearchContainer from "./components/tabbar/SearchContainer.vue"

//新闻部分组件
import NewsList from "./components/news/newslist.vue"
import NewsInfo from "./components/news/newsinfo.vue"

// 图片部分组件
import photolist from "./components/photos/photolist.vue"
import photoinfo from "./components/photos/photoinfo.vue"


//商品部分组件
import goodslist from "./components/goods/goodslist.vue"
import goodsinfo from "./components/goods/goodsinfo.vue"


// 3. 创建路由对象
var router =new VueRouter({
  routes:[
    {path:"/",component:HomeContainer},
    {path:"/home",component:HomeContainer},
    {path:"/member",component:MemberContainer},
    {path:"/shopcar",component:ShopcarContainer},
    {path:"/search",component:SearchContainer},
    {path:"/home/newslist",component:NewsList},
    {path:"/home/newsinfo/:id",component:NewsInfo},
    {path:"/home/photolist",component:photolist},
    {path:"/home/photoinfo/:id",component:photoinfo},
    {path:"/home/goodslist",component:goodslist},
    {path:"/home/goodsinfo/:id",component:goodsinfo},
  ],
  linkActiveClass:"mui-active"
});
export default router